﻿/*
 * Created by SharpDevelop.
 * User: XPMUser
 * Date: 11/01/2011
 * Time: 12:26
 * 
 * To change this template use Tools | Options | Coding | Edit Standard Headers.
 */
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;

namespace KDG.FoldersSize4
{
	/// <summary>
	/// Interaction logic for ScanView.xaml
	/// </summary>
	public partial class ScanView : UserControl
	{
		public ScanView()
		{
			InitializeComponent();
		}
		
		void TreeView_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
		{
		//	throw new NotImplementedException();
			if(sender is TreeView)
			{
				object o = (sender as TreeView).DataContext;
				ScanViewModel svm = o as ScanViewModel;
				if (svm != null) {
					svm.SelectedItem = e.NewValue as ScannerItem;
				}
			}
		}
	}
}